import json
import re
import time

import requests

headers = {
    "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
    "Accept-Encoding": "gzip, deflate",
    "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8",
    "Cache-Control": "max-age=0",
    "Connection": "keep-alive",
    "Host": "www.szse.cn",
    "If-Modified-Since": "Mon, 28 Mar 2022 08:08:01 GMT",
    "If-None-Match": "'62416ce1-ca12'",
    "Upgrade-Insecure-Requests": "1",
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.84 Safari/537.36"
}
url = "http://www.szse.cn/api/report/ShowReport/data?SHOWTYPE=JSON&CATALOGID=1800_jgxxgk&loading=first&random=0.3521433163941228"
resp = requests.get(url, headers=headers).text
# reObj = re.compile("encode-open='.*?'")
# reObj1 = re.compile("encode-open='|'")
# reObj2 = re.compile("gkxx_jgsy_.*")
resp = json.loads(resp)
print(resp[0]['data'][0]['gkxx_gsjc'])